
#include "c_go.h"
#include "dlfcn.h"

int dlopen_hello_so(int i) {
    void* handle;
    typedef int (*FPTR)(int);

    handle = dlopen("./c.so", 1);
    FPTR fptr = (FPTR)dlsym(handle, "hello_so");

    int result = (*fptr)(i);
    return result;
}
